<template>
  <div class="com-content">
    <!-- 面包屑 -->
    <Header :headerData="headerData" />

    <!-- 页面内容 -->
    <div class="com-sub-content">
      <div class="main-content sbxxcxxq-container" style="height: auto">
        <div class="search-row">
          <el-form :inline="true">
            <el-form-item label="关联报送表">
              <el-select v-model="value" style="width: 460px" @change="changeSelect">
                <el-option
                  v-for="item in selectData"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>

            <el-form-item class="search-col">
              <div class="flex-row-end search-btns">
                <el-button type="primary" @click="downloadPDF">导出</el-button>
              </div>
            </el-form-item>
          </el-form>
        </div>

        <!-- 页面展示的格式 -->
        <div class="sbxxcxxq-container__pdf">
          <table width="1000" align="center">
            <tbody>
              <tr>
                <td>
                  <div align="center"><b class="bbbt">资产负债表</b></div>
                </td>
              </tr>
            </tbody>
          </table>

          <table width="1000" align="center">
            <tbody>
              <tr>
                <td width="50%">纳税人识别号：{{ pageInfo.tl_number }}</td>
                <td width="40%">
                  税款所属期：{{ pageInfo.start_date }} 至 {{ pageInfo.end_date }}
                </td>
                <td align="right">会小企01表</td>
              </tr>
              <tr>
                <td align="left">纳税人名称：{{ pageInfo.tl_name }}</td>
                <td>报送日期：{{ pageInfo.submitted_date }}</td>
                <td align="right">单位：元</td>
              </tr>
            </tbody>
          </table>

          <table
            id="tabList"
            width="1000"
            class="border"
            cellspacing="0"
            cellpadding="0"
            align="center"
          >
            <tbody>
              <tr>
                <td width="158" align="center">资&nbsp;&nbsp;&nbsp;&nbsp;产</td>
                <td width="19" align="center" class="nowrap">行次</td>
                <td width="84" align="center" height="30">期末余额</td>
                <td width="84" align="center">年初余额</td>
                <td width="226" align="center">负债和所有者权益</td>
                <td width="23" align="center" class="nowrap">行次</td>
                <td width="84" align="center">期末余额</td>
                <td width="84" align="center">年初余额</td>
              </tr>
              <tr>
                <td height="30">流动资产：</td>
                <td>&nbsp;</td>
                <td>　 &nbsp;</td>
                <td>　 &nbsp;</td>
                <td>流动负债：</td>
                <td>&nbsp;</td>
                <td>&nbsp;　</td>

                <td>　 &nbsp;</td>
              </tr>
              <tr>
                <td height="30">　货币资金</td>
                <td align="center">1</td>
                <td align="right" class="jebg">{{ tableInfo.t1 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t2 }}</td>
                <td>　短期借款</td>
                <td align="center">31</td>
                <td align="right" class="jebg">{{ tableInfo.t3 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t4 }}</td>
              </tr>
              <tr>
                <td height="30">　短期投资</td>
                <td align="center">2</td>
                <td align="right" class="jebg">{{ tableInfo.t5 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t6 }}</td>
                <td>　应付票据</td>
                <td align="center">32</td>
                <td align="right" class="jebg">{{ tableInfo.t7 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t8 }}</td>
              </tr>

              <tr>
                <td height="30">　应收票据</td>
                <td align="center">3</td>
                <td align="right" class="jebg">{{ tableInfo.t9 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t10 }}</td>
                <td>　应付账款</td>
                <td align="center">33</td>
                <td align="right" class="jebg">{{ tableInfo.t11 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t12 }}</td>
              </tr>
              <tr>
                <td height="30">　应收账款</td>
                <td align="center">4</td>
                <td align="right" class="jebg">{{ tableInfo.t13 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t14 }}</td>
                <td>　预收账款</td>
                <td align="center">34</td>
                <td align="right" class="jebg">{{ tableInfo.t15 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t16 }}</td>
              </tr>
              <tr>
                <td height="30">　预付账款</td>
                <td align="center">5</td>
                <td align="right" class="jebg">{{ tableInfo.t17 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t18 }}</td>
                <td>　应付职工薪酬</td>
                <td align="center">35</td>
                <td align="right" class="jebg">{{ tableInfo.t19 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t20 }}</td>
              </tr>
              <tr>
                <td height="30">　应收股利</td>
                <td align="center">6</td>
                <td align="right" class="jebg">{{ tableInfo.t21 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t22 }}</td>
                <td>　应交税费</td>
                <td align="center">36</td>
                <td align="right" class="jebg">{{ tableInfo.t23 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t24 }}</td>
              </tr>
              <tr>
                <td height="30">　应收利息</td>
                <td align="center">7</td>
                <td align="right" class="jebg">{{ tableInfo.t25 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t26 }}</td>
                <td>　应付利息</td>
                <td align="center">37</td>
                <td align="right" class="jebg">{{ tableInfo.t27 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t28 }}</td>
              </tr>
              <tr>
                <td height="30">　其他应收款</td>
                <td align="center">8</td>
                <td align="right" class="jebg">{{ tableInfo.t29 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t30 }}</td>
                <td>　应付利润</td>
                <td align="center">38</td>
                <td align="right" class="jebg">{{ tableInfo.t31 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t32 }}</td>
              </tr>
              <tr>
                <td height="30">　存货</td>
                <td align="center">9</td>
                <td align="right" class="jebg">{{ tableInfo.t33 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t34 }}</td>
                <td>　其他应付款</td>
                <td align="center">39</td>
                <td align="right" class="jebg">{{ tableInfo.t35 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t36 }}</td>
              </tr>
              <tr>
                <td height="30">　　其中：原材料</td>
                <td align="center">10</td>
                <td align="right" class="jebg">{{ tableInfo.t37 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t38 }}</td>
                <td>　其他流动负债</td>
                <td align="center">40</td>
                <td align="right" class="jebg">{{ tableInfo.t39 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t40 }}</td>
              </tr>

              <tr>
                <td height="30">　在产品</td>
                <td align="center">11</td>
                <td align="right" class="jebg">{{ tableInfo.t41 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t42 }}</td>
                <td>　流动负债合计</td>
                <td align="center">41</td>
                <td align="right" class="jebg">{{ tableInfo.t43 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t44 }}</td>
              </tr>

              <tr>
                <td height="30">　库存商品</td>
                <td align="center">12</td>
                <td align="right" class="jebg">{{ tableInfo.t45 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t46 }}</td>
                <td>非流动负债：</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>

              <tr>
                <td height="30">　周转材料</td>
                <td align="center">13</td>
                <td align="right" class="jebg">{{ tableInfo.t47 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t48 }}</td>
                <td>　长期借款</td>
                <td align="center">42</td>
                <td align="right" class="jebg">{{ tableInfo.t49 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t50 }}</td>
              </tr>

              <tr>
                <td height="30">　其他流动资产</td>
                <td align="center">14</td>
                <td align="right" class="jebg">{{ tableInfo.t51 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t52 }}</td>
                <td>　长期应付款</td>
                <td align="center">43</td>
                <td align="right" class="jebg">{{ tableInfo.t53 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t54 }}</td>
              </tr>

              <tr>
                <td height="30">　流动资产合计</td>
                <td align="center">15</td>
                <td align="right" class="jebg">{{ tableInfo.t55 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t56 }}</td>
                <td>　递延收益</td>
                <td align="center">44</td>
                <td align="right" class="jebg">{{ tableInfo.t57 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t58 }}</td>
              </tr>
              <tr>
                <td height="30">非流动资产：</td>
                <td>&nbsp;</td>
                <td>&nbsp;　</td>

                <td>　 &nbsp;</td>

                <td>　其他非流动负债</td>
                <td align="center">45</td>
                <td align="right" class="jebg">{{ tableInfo.t59 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t60 }}</td>
              </tr>
              <tr>
                <td height="30">　长期债券投资</td>
                <td align="center">16</td>
                <td align="right" class="jebg">{{ tableInfo.t61 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t62 }}</td>
                <td>　非流动负债合计</td>
                <td align="center">46</td>
                <td align="right" class="jebg">{{ tableInfo.t63 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t64 }}</td>
              </tr>
              <tr>
                <td height="30">　长期股权投资</td>
                <td align="center">17</td>
                <td align="right" class="jebg">{{ tableInfo.t65 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t66 }}</td>
                <td>　负债合计</td>
                <td align="center">47</td>
                <td align="right" class="jebg">{{ tableInfo.t67 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t68 }}</td>
              </tr>

              <tr>
                <td height="30">　固定资产原价</td>
                <td align="center">18</td>
                <td align="right" class="jebg">{{ tableInfo.t69 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t70 }}</td>
                <td />
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td height="30">　减：累计折旧</td>
                <td align="center">19</td>
                <td align="right" class="jebg">{{ tableInfo.t71 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t72 }}</td>
                <td />
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td height="30">　固定资产账面价值</td>
                <td align="center">20</td>
                <td align="right" class="jebg">{{ tableInfo.t73 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t74 }}</td>
                <td />
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td height="30">　在建工程</td>
                <td align="center">21</td>
                <td align="right" class="jebg">{{ tableInfo.t75 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t76 }}</td>
                <td />
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td height="30">　工程物资</td>
                <td align="center">22</td>
                <td align="right" class="jebg">{{ tableInfo.t77 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t78 }}</td>
                <td />
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td height="30">　固定资产清理</td>
                <td align="center">23</td>
                <td align="right" class="jebg">{{ tableInfo.t79 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t80 }}</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td height="30">　生产性生物资产</td>
                <td align="center">24</td>
                <td align="right" class="jebg">{{ tableInfo.t81 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t82 }}</td>
                <td>所有者权益（或股东权益）：</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>

              <tr>
                <td height="30">　无形资产</td>
                <td align="center">25</td>
                <td align="right" class="jebg">{{ tableInfo.t83 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t84 }}</td>
                <td>　实收资本（或股本）</td>
                <td align="center">48</td>
                <td align="right" class="jebg">{{ tableInfo.t85 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t86 }}</td>
              </tr>
              <tr>
                <td height="30">　开发支出</td>
                <td align="center">26</td>
                <td align="right" class="jebg">{{ tableInfo.t87 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t88 }}</td>
                <td>　资本公积</td>
                <td align="center">49</td>
                <td align="right" class="jebg">{{ tableInfo.t89 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t90 }}</td>
              </tr>
              <tr>
                <td height="30">　长期待摊费用</td>
                <td align="center">27</td>
                <td align="right" class="jebg">{{ tableInfo.t91 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t92 }}</td>
                <td>　盈余公积</td>
                <td align="center">50</td>
                <td align="right" class="jebg">{{ tableInfo.t93 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t94 }}</td>
              </tr>
              <tr>
                <td height="30">　其他非流动资产</td>
                <td align="center">28</td>
                <td align="right" class="jebg">{{ tableInfo.t95 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t96 }}</td>
                <td>　未分配利润</td>
                <td align="center">51</td>
                <td align="right" class="jebg">{{ tableInfo.t97 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t98 }}</td>
              </tr>
              <tr>
                <td height="30">　非流动资产合计</td>
                <td align="center">29</td>
                <td align="right" class="jebg">{{ tableInfo.t99 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t100 }}</td>
                <td>　所有者权益（或股东权益）合计</td>
                <td align="center">52</td>
                <td align="right" class="jebg">{{ tableInfo.t101 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t102 }}</td>
              </tr>
              <tr>
                <td height="30">　资产合计</td>
                <td align="center">30</td>
                <td align="right" class="jebg">{{ tableInfo.t103 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t104 }}</td>
                <td>　负债和所有者权益（或股东权益）总计</td>
                <td align="center">53</td>
                <td align="right" class="jebg">{{ tableInfo.t105 }}</td>
                <td align="right" class="jebg">{{ tableInfo.t106 }}</td>
              </tr>
            </tbody>
          </table>
        </div>

        <!-- 打印的格式 -->
        <div style="height: 0; overflow: hidden">
          <div class="sbxxcxxq-container__pdf sbxxcxxq-container__pdf1">
            <!-- 资产负债表 -->
            <div id="balance-sheet" class="print-section">
              <table width="1000" align="center">
                <tbody>
                  <tr>
                    <td>
                      <div align="center"><b class="bbbt">资产负债表</b></div>
                    </td>
                  </tr>
                </tbody>
              </table>

              <table width="1000" align="center">
                <tbody>
                  <tr style="height: 30px">
                    <td>会小企01表</td>
                  </tr>
                  <tr style="height: 30px">
                    <td width="50%">纳税人识别号：{{ pageInfo.tl_number }}</td>
                    <td width="40%">
                      税款所属期起止：{{ pageInfo.start_date }} 至 {{ pageInfo.end_date }}
                    </td>
                  </tr>
                  <tr style="height: 30px">
                    <td align="left">编制单位：山东万兴家具有限公司</td>
                    <td>报送日期：{{ pageInfo.submitted_date }}</td>
                    <td align="right">单位：元</td>
                  </tr>
                </tbody>
              </table>

              <table
                id="tabList"
                width="1000"
                class="border"
                cellspacing="0"
                cellpadding="0"
                align="center"
              >
                <tbody>
                  <tr>
                    <td width="158" align="center">资&nbsp;&nbsp;&nbsp;&nbsp;产</td>
                    <td width="19" align="center" class="nowrap">行次</td>
                    <td width="84" align="center" height="30">期末余额</td>
                    <td width="84" align="center">年初余额</td>
                    <td width="226" align="center">负债和所有者权益</td>
                    <td width="23" align="center" class="nowrap">行次</td>
                    <td width="84" align="center">期末余额</td>
                    <td width="84" align="center">年初余额</td>
                  </tr>
                  <tr>
                    <td height="30">流动资产：</td>
                    <td>&nbsp;</td>
                    <td>　 &nbsp;</td>
                    <td>　 &nbsp;</td>
                    <td>流动负债：</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;　</td>

                    <td>　 &nbsp;</td>
                  </tr>
                  <tr>
                    <td height="30">　货币资金</td>
                    <td align="center">1</td>
                    <td align="right" class="jebg">{{ tableInfo.t1 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t2 }}</td>
                    <td>　短期借款</td>
                    <td align="center">31</td>
                    <td align="right" class="jebg">{{ tableInfo.t3 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t4 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　短期投资</td>
                    <td align="center">2</td>
                    <td align="right" class="jebg">{{ tableInfo.t5 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t6 }}</td>
                    <td>　应付票据</td>
                    <td align="center">32</td>
                    <td align="right" class="jebg">{{ tableInfo.t7 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t8 }}</td>
                  </tr>

                  <tr>
                    <td height="30">　应收票据</td>
                    <td align="center">3</td>
                    <td align="right" class="jebg">{{ tableInfo.t9 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t10 }}</td>
                    <td>　应付账款</td>
                    <td align="center">33</td>
                    <td align="right" class="jebg">{{ tableInfo.t11 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t12 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　应收账款</td>
                    <td align="center">4</td>
                    <td align="right" class="jebg">{{ tableInfo.t13 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t14 }}</td>
                    <td>　预收账款</td>
                    <td align="center">34</td>
                    <td align="right" class="jebg">{{ tableInfo.t15 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t16 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　预付账款</td>
                    <td align="center">5</td>
                    <td align="right" class="jebg">{{ tableInfo.t17 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t18 }}</td>
                    <td>　应付职工薪酬</td>
                    <td align="center">35</td>
                    <td align="right" class="jebg">{{ tableInfo.t19 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t20 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　应收股利</td>
                    <td align="center">6</td>
                    <td align="right" class="jebg">{{ tableInfo.t21 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t22 }}</td>
                    <td>　应交税费</td>
                    <td align="center">36</td>
                    <td align="right" class="jebg">{{ tableInfo.t23 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t24 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　应收利息</td>
                    <td align="center">7</td>
                    <td align="right" class="jebg">{{ tableInfo.t25 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t26 }}</td>
                    <td>　应付利息</td>
                    <td align="center">37</td>
                    <td align="right" class="jebg">{{ tableInfo.t27 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t28 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　其他应收款</td>
                    <td align="center">8</td>
                    <td align="right" class="jebg">{{ tableInfo.t29 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t30 }}</td>
                    <td>　应付利润</td>
                    <td align="center">38</td>
                    <td align="right" class="jebg">{{ tableInfo.t31 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t32 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　存货</td>
                    <td align="center">9</td>
                    <td align="right" class="jebg">{{ tableInfo.t33 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t34 }}</td>
                    <td>　其他应付款</td>
                    <td align="center">39</td>
                    <td align="right" class="jebg">{{ tableInfo.t35 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t36 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　其中：原材料</td>
                    <td align="center">10</td>
                    <td align="right" class="jebg">{{ tableInfo.t37 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t38 }}</td>
                    <td>　其他流动负债</td>
                    <td align="center">40</td>
                    <td align="right" class="jebg">{{ tableInfo.t39 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t40 }}</td>
                  </tr>

                  <tr>
                    <td height="30">　在产品</td>
                    <td align="center">11</td>
                    <td align="right" class="jebg">{{ tableInfo.t41 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t42 }}</td>
                    <td>　流动负债合计</td>
                    <td align="center">41</td>
                    <td align="right" class="jebg">{{ tableInfo.t43 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t44 }}</td>
                  </tr>

                  <tr>
                    <td height="30">　库存商品</td>
                    <td align="center">12</td>
                    <td align="right" class="jebg">{{ tableInfo.t45 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t46 }}</td>
                    <td>非流动负债：</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>

                  <tr>
                    <td height="30">　周转材料</td>
                    <td align="center">13</td>
                    <td align="right" class="jebg">{{ tableInfo.t47 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t48 }}</td>
                    <td>　长期借款</td>
                    <td align="center">42</td>
                    <td align="right" class="jebg">{{ tableInfo.t49 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t50 }}</td>
                  </tr>

                  <tr>
                    <td height="30">　其他流动资产</td>
                    <td align="center">14</td>
                    <td align="right" class="jebg">{{ tableInfo.t51 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t52 }}</td>
                    <td>　长期应付款</td>
                    <td align="center">43</td>
                    <td align="right" class="jebg">{{ tableInfo.t53 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t54 }}</td>
                  </tr>

                  <tr>
                    <td height="30">　流动资产合计</td>
                    <td align="center">15</td>
                    <td align="right" class="jebg">{{ tableInfo.t55 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t56 }}</td>
                    <td>　递延收益</td>
                    <td align="center">44</td>
                    <td align="right" class="jebg">{{ tableInfo.t57 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t58 }}</td>
                  </tr>
                  <tr>
                    <td height="30">非流动资产：</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;　</td>

                    <td>　 &nbsp;</td>

                    <td>　其他非流动负债</td>
                    <td align="center">45</td>
                    <td align="right" class="jebg">{{ tableInfo.t59 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t60 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　长期债券投资</td>
                    <td align="center">16</td>
                    <td align="right" class="jebg">{{ tableInfo.t61 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t62 }}</td>
                    <td>　非流动负债合计</td>
                    <td align="center">46</td>
                    <td align="right" class="jebg">{{ tableInfo.t63 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t64 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　长期股权投资</td>
                    <td align="center">17</td>
                    <td align="right" class="jebg">{{ tableInfo.t65 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t66 }}</td>
                    <td>　负债合计</td>
                    <td align="center">47</td>
                    <td align="right" class="jebg">{{ tableInfo.t67 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t68 }}</td>
                  </tr>

                  <tr>
                    <td height="30">　固定资产原价</td>
                    <td align="center">18</td>
                    <td align="right" class="jebg">{{ tableInfo.t69 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t70 }}</td>
                    <td />
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="30">　减：累计折旧</td>
                    <td align="center">19</td>
                    <td align="right" class="jebg">{{ tableInfo.t71 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t72 }}</td>
                    <td />
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="30">　固定资产账面价值</td>
                    <td align="center">20</td>
                    <td align="right" class="jebg">{{ tableInfo.t73 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t74 }}</td>
                    <td />
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="30">　在建工程</td>
                    <td align="center">21</td>
                    <td align="right" class="jebg">{{ tableInfo.t75 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t76 }}</td>
                    <td />
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="30">　工程物资</td>
                    <td align="center">22</td>
                    <td align="right" class="jebg">{{ tableInfo.t77 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t78 }}</td>
                    <td />
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="30">　固定资产清理</td>
                    <td align="center">23</td>
                    <td align="right" class="jebg">{{ tableInfo.t79 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t80 }}</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="30">　生产性生物资产</td>
                    <td align="center">24</td>
                    <td align="right" class="jebg">{{ tableInfo.t81 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t82 }}</td>
                    <td>所有者权益（或股东权益）：</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>

                  <tr>
                    <td height="30">　无形资产</td>
                    <td align="center">25</td>
                    <td align="right" class="jebg">{{ tableInfo.t83 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t84 }}</td>
                    <td>　实收资本（或股本）</td>
                    <td align="center">48</td>
                    <td align="right" class="jebg">{{ tableInfo.t85 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t86 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　开发支出</td>
                    <td align="center">26</td>
                    <td align="right" class="jebg">{{ tableInfo.t87 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t88 }}</td>
                    <td>　资本公积</td>
                    <td align="center">49</td>
                    <td align="right" class="jebg">{{ tableInfo.t89 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t90 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　长期待摊费用</td>
                    <td align="center">27</td>
                    <td align="right" class="jebg">{{ tableInfo.t91 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t92 }}</td>
                    <td>　盈余公积</td>
                    <td align="center">50</td>
                    <td align="right" class="jebg">{{ tableInfo.t93 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t94 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　其他非流动资产</td>
                    <td align="center">28</td>
                    <td align="right" class="jebg">{{ tableInfo.t95 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t96 }}</td>
                    <td>　未分配利润</td>
                    <td align="center">51</td>
                    <td align="right" class="jebg">{{ tableInfo.t97 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t98 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　非流动资产合计</td>
                    <td align="center">29</td>
                    <td align="right" class="jebg">{{ tableInfo.t99 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t100 }}</td>
                    <td>　所有者权益（或股东权益）合计</td>
                    <td align="center">52</td>
                    <td align="right" class="jebg">{{ tableInfo.t101 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t102 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　资产合计</td>
                    <td align="center">30</td>
                    <td align="right" class="jebg">{{ tableInfo.t103 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t104 }}</td>
                    <td>　负债和所有者权益（或股东权益）总计</td>
                    <td align="center">53</td>
                    <td align="right" class="jebg">{{ tableInfo.t105 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t106 }}</td>
                  </tr>
                </tbody>
              </table>
            </div>

            <!-- 添加分页 -->
            <div class="page-break" />

            <!-- 利润表 -->
            <div id="profit-statement" class="print-section">
              <table width="717" align="center">
                <tbody>
                  <tr>
                    <td>
                      <div align="center"><b class="bbbt">利　　润　　表</b></div>
                    </td>
                  </tr>
                </tbody>
              </table>

              <table width="717" align="center">
                <tbody>
                  <tr style="height: 30px">
                    <td>会小企02表</td>
                  </tr>
                  <tr style="height: 30px">
                    <td width="50%">纳税人识别号：{{ pageInfo.tl_number }}</td>
                    <td width="40%">
                      税款所属期起止：{{ pageInfo.start_date }} 至 {{ pageInfo.end_date }}
                    </td>
                  </tr>
                  <tr style="height: 30px">
                    <td align="left">编制单位：山东万兴家具有限公司</td>
                    <td>报送日期：{{ pageInfo.submitted_date }}</td>
                    <td align="right">单位：元</td>
                  </tr>
                </tbody>
              </table>

              <table
                id="tabList"
                width="717"
                class="border"
                cellspacing="0"
                cellpadding="0"
                align="center"
              >
                <tbody>
                  <tr>
                    <td width="392" height="30" align="center">项目</td>
                    <td width="59" align="center" class="nowrap">行次</td>
                    <td width="120" align="center">本月金额</td>
                    <td width="117" align="center">本年累计金额</td>
                  </tr>

                  <tr>
                    <td height="30">一、营业收入</td>
                    <td align="center">1</td>
                    <td align="right" class="jebg">{{ tableInfo.t1 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t2 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　减：营业成本</td>
                    <td align="center">2</td>
                    <td align="right" class="jebg">{{ tableInfo.t3 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t4 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　税金及附加</td>
                    <td align="center">3</td>
                    <td align="right" class="jebg">{{ tableInfo.t5 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t6 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　其中：消费税</td>
                    <td align="center">4</td>
                    <td align="right" class="jebg">{{ tableInfo.t7 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t8 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　营业税</td>
                    <td align="center">5</td>
                    <td align="right" class="jebg">{{ tableInfo.t9 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t10 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　城市维护建设税</td>
                    <td align="center">6</td>
                    <td align="right" class="jebg">{{ tableInfo.t11 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t12 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　资源税</td>
                    <td align="center">7</td>
                    <td align="right" class="jebg">{{ tableInfo.t13 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t14 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　土地增值税</td>
                    <td align="center">8</td>
                    <td align="right" class="jebg">{{ tableInfo.t15 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t16 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　城镇土地使用税、房产税、车船税、印花税</td>
                    <td align="center">9</td>
                    <td align="right" class="jebg">{{ tableInfo.t17 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t18 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　教育费附加、矿产资源补偿费、排污费</td>
                    <td align="center">10</td>
                    <td align="right" class="jebg">{{ tableInfo.t19 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t20 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　销售费用</td>
                    <td align="center">11</td>
                    <td align="right" class="jebg">{{ tableInfo.t21 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t22 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　其中：商品维修费</td>
                    <td align="center">12</td>
                    <td align="right" class="jebg">{{ tableInfo.t23 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t24 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　广告费和业务宣传费</td>
                    <td align="center">13</td>
                    <td align="right" class="jebg">{{ tableInfo.t25 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t26 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　管理费用</td>
                    <td align="center">14</td>
                    <td align="right" class="jebg">{{ tableInfo.t27 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t28 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　其中：开办费</td>
                    <td align="center">15</td>
                    <td align="right" class="jebg">{{ tableInfo.t29 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t30 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　业务招待费</td>
                    <td align="center">16</td>
                    <td align="right" class="jebg">{{ tableInfo.t31 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t32 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　研究费用</td>
                    <td align="center">17</td>
                    <td align="right" class="jebg">{{ tableInfo.t33 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t34 }}</td>
                  </tr>

                  <tr>
                    <td height="30">　　财务费用</td>
                    <td align="center">18</td>
                    <td align="right" class="jebg">{{ tableInfo.t35 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t36 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　其中：利息费用（收入以“-”号填列）</td>
                    <td align="center">19</td>
                    <td align="right" class="jebg">{{ tableInfo.t37 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t38 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　加：投资收益（损失以“-”号填列）</td>
                    <td align="center">20</td>
                    <td align="right" class="jebg">{{ tableInfo.t39 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t40 }}</td>
                  </tr>
                  <tr>
                    <td height="30">二、营业利润（亏损以“-”号填列）</td>
                    <td align="center">21</td>
                    <td align="right" class="jebg">{{ tableInfo.t41 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t42 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　加：营业外收入</td>
                    <td align="center">22</td>
                    <td align="right" class="jebg">{{ tableInfo.t43 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t44 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　其中：政府补助</td>
                    <td align="center">23</td>
                    <td align="right" class="jebg">{{ tableInfo.t45 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t46 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　减：营业外支出</td>
                    <td align="center">24</td>
                    <td align="right" class="jebg">{{ tableInfo.t47 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t48 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　其中：坏账损失</td>
                    <td align="center">25</td>
                    <td align="right" class="jebg">{{ tableInfo.t49 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t50 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　无法收回的长期债券投资损失</td>
                    <td align="center">26</td>
                    <td align="right" class="jebg">{{ tableInfo.t51 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t52 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　无法收回的长期股权投资损失</td>
                    <td align="center">27</td>
                    <td align="right" class="jebg">{{ tableInfo.t53 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t54 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　自然灾害等不可抗力因素造成的损失</td>
                    <td align="center">28</td>
                    <td align="right" class="jebg">{{ tableInfo.t55 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t56 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　税收滞纳金</td>
                    <td align="center">29</td>
                    <td align="right" class="jebg">{{ tableInfo.t57 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t58 }}</td>
                  </tr>
                  <tr>
                    <td height="30">三、利润总额（亏损总额以“-”号填列）</td>
                    <td align="center">30</td>
                    <td align="right" class="jebg">{{ tableInfo.t59 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t60 }}</td>
                  </tr>
                  <tr>
                    <td height="30">　　减：所得税费用</td>
                    <td align="center">31</td>
                    <td align="right" class="jebg">{{ tableInfo.t61 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t62 }}</td>
                  </tr>
                  <tr>
                    <td height="30">四、净利润（净亏损以“-”号填列）</td>
                    <td align="center">32</td>
                    <td align="right" class="jebg">{{ tableInfo.t63 }}</td>
                    <td align="right" class="jebg">{{ tableInfo.t64 }}</td>
                  </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { reactive, ref, onMounted } from "vue";
import Http from "@/utils/api";
import router from "@/router";
import htmlToPdf from "@/utils/htmlToPdf";
import { formatIdNumber } from "@/utils/index";

const { currentRoute } = useRouter();
const route = currentRoute.value;

const headerData = ref<any>({
  title: "财务报表信息查询详情",
  type: 2,
  list: [
    { title: "税务数字账户", url: "" },
    { title: "账户查询", url: "" },
    { title: "财务报表信息查询", url: "" },
  ],
});

const pageInfo = ref<any>({});
const tableInfo = ref<any>({});
const value = ref("1");
const selectData = [
  {
    value: "1",
    label: "资产负债表（适用于执行小企业会计准则财务报表）",
  },
  {
    value: "2",
    label: "利润表（适用于执行小企业会计准则财务报表）",
  },
];

// 获取活动信息
function getInfo() {
  Http.Get("api4", {
    id: route.query.id1,
    table: "balance_sheet",
  }).then((res: any) => {
    if (res.code == 1) {
      pageInfo.value = res.data;
      tableInfo.value = res.data.content;
    } else {
      ElMessage({
        message: res.message,
        type: "error",
        plain: true,
      });
    }
  });
}

// 导出pdf
function downloadPDF() {
  htmlToPdf.getPdf({
    title: "财务报表报送与信息采集（小企业会计准则）",
    ids: ["#balance-sheet", "#profit-statement"],
    direction: "portrait",
  });
}

function changeSelect() {
  if (value.value == "2") {
    router.push("/pages/a17?id1=" + route.query.id1 + "&id2=" + route.query.id2);
  }
}

// 生命周期
onMounted(() => {
  getInfo();
});
</script>

<style lang="scss" scoped>
@use "./css/style";
@use "./css/table";

/* 移除scoped限定符，改为全局样式 */
@media print {
  .page-break {
    display: block;
    height: 0;
    page-break-after: always;
    break-after: page;
  }

  .print-section {
    page-break-inside: avoid;
  }

  /* 隐藏非打印元素 */
  .sbxxcxxq-container__pdf > :not(.print-section) {
    display: none;
  }
}
</style>
